package com.tmt.im.wallet.controler.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.experimental.SuperBuilder;

import java.io.Serial;
import java.io.Serializable;

/**
 * @Description TODO
 * @Author wuyi
 * @Date 2024/9/5 8:59
 * @Version 1.0
 **/

@Getter
@Setter
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@Tag(name = "PageQueryRequest", description = "分页查询请求对象")
public class PageQueryRequest implements Serializable {

    @Serial
    private static final long serialVersionUID = 6337789074041483183L;

    @Schema(description = "页序号，从0开始")
    @NotNull
    @Min(value = 0, message = "页序号必须大于或等于0")
    private Integer pageIndex;

    @Schema(description = "每页记录条数")
    @NotNull
    @Max(value = 100, message = "每页最多返回100条数据")
    private Integer pageSize;

    @Schema(description = "按创建时间倒序查询")
    @NotNull
    private Boolean desc;

}
